<template>
<div class="sideCollapse" id="domColapse">
    <i :class="{ 'el-icon-s-unfold': !opened, 'el-icon-s-fold': opened }" @click="toggleOpen()"></i>
</div>
</template>

<script>
import { mapState,mapMutations } from 'vuex'
export default {
    methods: {
        ...mapMutations(['SET_OPENED']),
        toggleOpen() {
           this.SET_OPENED()
        }
    },
    computed:{
        ...mapState(['opened'])
    }
}
</script>

<style lang="scss" scoped>
.sideCollapse i {
    font-size: 18px;
    color: #363f44;
    cursor: pointer;
}
</style>